package com.ssd.entity.dto.request;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;
import javax.validation.constraints.Null;

@Data
@ApiModel("礼品保存请求模型")
@Validated
public class GiftSaveReqDTO {

    @ApiModelProperty(value = "礼品名称",required = true)
    @Null(message = "礼品名称为空，请输入礼品名称")
    private String giftName;

    @ApiModelProperty(value = "礼品图片",required = true)
    @Null(message = "礼品图片为空，请输入礼品图片")
    private String giftImage;

    @ApiModelProperty(value = "礼品兑换所需的积分",required = true)
    @Null(message = "礼品兑换所需的积分为空，请输入礼品兑换所需的积分")
    @Min(value = 1, message = "礼品兑换所需的积分请输入大于/等于1的整数")
    private Integer requiredPoints;

    @ApiModelProperty(value = "状态：1 上架，2 下架")
    private Integer status=2;

    @ApiModelProperty(value = "库存",required = true)
    @Min(value = 0, message = "库存请输入大于/等于0的整数")
    private Integer stock=0;

    @ApiModelProperty(value = "礼品详情",required = true)
    @Null(message = "礼品详情为空，请输入礼品详情")
    private String remark;
}
